package com.example.controller;


import com.example.service.ITempCService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 王鹤蒲
 * @since 2023-08-17
 */
@RestController
@Api
@RequestMapping("/temp-c")
public class TempCController {

    @Autowired
    private ITempCService iTempCService;

    @RequestMapping(value = "/import",method = RequestMethod.POST)
    public void importExcel( MultipartFile file) throws IOException {
        iTempCService.importExcel(file);
    }

    @RequestMapping(value = "/export",method = RequestMethod.GET)
    public void export( ) throws IOException {
        iTempCService.export();
    }
}

